package com.itheima.sh.pojo;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Date;
import java.util.List;
import java.util.Map;

@ConfigurationProperties(prefix="man")  // 读取配置文件 前缀为 man所有的信息，并封装
//@Component  // 组件 存到Spring IOC容器
public class Man {

    private String userName;
    private Boolean boss;
    private Date birth;
    private Integer age;
    private String[] address;  // 数组
    private List<String> addressList;  // 集合
    private Map<String, Object> hobbies;  // 爱好
    private Woman woman;
    private List<Woman> wifes;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Boolean getBoss() {
        return boss;
    }

    public void setBoss(Boolean boss) {
        this.boss = boss;
    }

    public Date getBirth() {
        return birth;
    }

    public void setBirth(Date birth) {
        this.birth = birth;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String[] getAddress() {
        return address;
    }

    public void setAddress(String[] address) {
        this.address = address;
    }

    public List<String> getAddressList() {
        return addressList;
    }

    public void setAddressList(List<String> addressList) {
        this.addressList = addressList;
    }

    public Map<String, Object> getHobbies() {
        return hobbies;
    }

    public void setHobbies(Map<String, Object> hobbies) {
        this.hobbies = hobbies;
    }

    public Woman getWoman() {
        return woman;
    }

    public void setWoman(Woman woman) {
        this.woman = woman;
    }

    public List<Woman> getWifes() {
        return wifes;
    }

    public void setWifes(List<Woman> wifes) {
        this.wifes = wifes;
    }
}


class Woman {

    private String userName;
    private Integer age;
    private List<String> addresses;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public List<String> getAddresses() {
        return addresses;
    }

    public void setAddresses(List<String> addresses) {
        this.addresses = addresses;
    }
}
